package com.example.module_test

import android.os.Bundle
import android.util.Log
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.lifecycle.lifecycleScope
import com.example.lib_net.api.Api
import com.example.lib_storage.AppMMKV
import com.example.lib_storage.AuthMMKV
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import javax.inject.Inject
@AndroidEntryPoint
class MainActivity : AppCompatActivity() {
    @Inject
    lateinit var api:Api
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main)
        //写数据
        AppMMKV.splashAgreement = true
        AuthMMKV.token = "7273737"
        //读数据
        Log.d("TAG", "onCreate: ${AppMMKV.splashAgreement}")
        Log.d("TAG", "onCreate: ${AuthMMKV.token}")

        lifecycleScope.launch {
            val appLevelCheck = api.appLevelCheck("ANDROID")
            Log.d("TAG", appLevelCheck.toString())
        }


    }

}